package mdm.led.entity.three;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;

import mdm.led.entity.department.Department;

/**
 *
 * @author :Monarch丿He
 * @date :2018年12月12日
 * @explain : 三查表实体
 */
public class ThreeTable {
	// 三查表id
	private Integer threeid;
	// 三查表名称
	private String threename;
	// 开始时间
	private Date starttime;
	// 表格类型 ( 1:内部表 2:外部表)
	private Integer tabletype;
	// 表格类型名称
	private String tableTypeName;
	// 自查类型 对应科室的业务口
	private Integer selftype;
	// 自查类型 名称
	private String selftypeName;
	// 修改时间
	private Date updatetime;
	// 自查周期
	private Integer period;
	// 自查部门id 字符串 ',' 分割
	private String department;
	// 自查部门集合
	private List<Department> departments;
	// 表状态 (1:有效 2:无效)
	private Integer status;

	// 检查项集合
	private List<ThreeItem> items;

	
	public List<Department> getDepartments() {
		return departments;
	}

	public void setDepartments(List<Department> departments) {
		this.departments = departments;
	}

	public String getSelftypeName() {
		return selftypeName;
	}

	public void setSelftypeName(String selftypeName) {
		this.selftypeName = selftypeName;
	}

	public String getTableTypeName() {
		return tableTypeName;
	}

	public void setTableTypeName(String tableTypeName) {
		this.tableTypeName = tableTypeName;
	}

	public Integer getThreeid() {
		return threeid;
	}

	public void setThreeid(Integer threeid) {
		this.threeid = threeid;
	}

	public String getThreename() {
		return threename;
	}

	public void setThreename(String threename) {
		this.threename = threename;
	}

	public Date getStarttime() throws ParseException {
		// 日期格式
		SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
		if (starttime == null) {
			return null;
		}
		String format2 = format.format(starttime);
		Date parse = format.parse(format2);
		return parse;
	}

	public void setStarttime(Date starttime) throws ParseException {
		this.starttime = starttime;
	}

	public Integer getTabletype() {
		return tabletype;
	}

	public void setTabletype(Integer tabletype) {
		this.tabletype = tabletype;
	}

	public Integer getSelftype() {
		return selftype;
	}

	public void setSelftype(Integer selftype) {
		this.selftype = selftype;
	}

	public Date getUpdatetime() throws ParseException {
		Date parse = null;
		if (updatetime != null) {
			// 日期格式
			SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm");
			String format2 = format.format(updatetime);
			parse = format.parse(format2);
		}

		return parse;
	}

	public void setUpdatetime(Date updatetime) throws ParseException {
		this.updatetime = updatetime;
	}

	public Integer getPeriod() {
		return period;
	}

	public void setPeriod(Integer period) {
		this.period = period;
	}

	public String getDepartment() {
		return department;
	}

	public void setDepartment(String department) {
		this.department = department;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public List<ThreeItem> getItems() {
		return items;
	}

	public void setItems(List<ThreeItem> items) {
		this.items = items;
	}

}
